xen: Preserve reserved grant entries when switching versions
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>
Sat, 28 Jan 2012 13:49:41 +0000 (13:49 +0000)
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>
Sat, 28 Jan 2012 13:49:41 +0000 (13:49 +0000)
commiteaef0894da4cec61974892502a1f77f2e0585d4d
tree97df4e04cd049965460149ef59eb04754a8f3a45
parente60e5c9642a733ac951203e4d349ccb2609c97ef
xen: Preserve reserved grant entries when switching versions

In order for the toolstack to use reserved grant table entries, the
grant table for a guest must be initialized prior to the guest's boot.
When the guest switches grant table versions (necessary if the guest
is using v2 grant tables, or on kexec if switching grant versions),
these initial grants will be cleared. Instead of clearing them,
preserve the grants across the type change.

Attempting to preserve v2-only features such as sub-page grants will
produce a warning and clear the resulting v1 grant entry.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Committed-by: Keir Fraser <keir@xen.org>
xen/common/grant_table.c
xen/include/public/grant_table.h